using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TestEncoding {
	public partial class Form1 : Form {
		public Form1() {
			InitializeComponent();
		}

		const string s1 = "96|/wEWCALWoaG5DQKpn5bCCwLEiLTXBQKa/+iZBQKN/6CDBgL5zYOUAgLSmpT7AgLg8Za2BcRSJjn7j8Vh9wxHUNesdGO6ceNy";
		const string s2 = "96|/wEWCALWoaG5DQKpn5bCCwLEiLTXBQKa/+iZBQKN/6CDBgL5zYOUAgLSmpT7AgLg8Za2BcRSJjn7j8Vh9wxHUNesdGO6ceNy";

		private void decodeButton_Click( object sender, EventArgs e ) {
			string encoded = this.encodedText.Text;
			string[] encodedParts = encoded.Split( new char[] { '|' } );
			int len = int.Parse( encodedParts[0] );
			encoded = encodedParts[1];
			byte[] result = System.Convert.FromBase64String( encoded );
			string decoded = System.Text.Encoding.ASCII.GetString( result );
			this.plainText.Text = decoded;
		}
	}
}